package demo;

import demo.standard.ConcreteBuilderA;
import demo.standard.ConcreteBuilderB;
import demo.standard.Director;

public class ClientForStandard {

    public static void main(String[] args) {

        ConcreteBuilderA builderA1 = new ConcreteBuilderA();
        Director directorA = new Director(builderA1);
        directorA.constructProduct1();
        System.out.println("建造者A创建产品1：" + builderA1.getResult());


        ConcreteBuilderA builderA2 = new ConcreteBuilderA();
        directorA = new Director(builderA2);
        directorA.constructProduct2();
        System.out.println("建造者A创建产品2：" + builderA2.getResult());

        ConcreteBuilderA builderA3 = new ConcreteBuilderA();
        directorA = new Director(builderA3);
        directorA.constructProduct3();
        System.out.println("建造者A创建产品3：" + builderA3.getResult() + "\n");

        ConcreteBuilderB builderB1 = new ConcreteBuilderB();
        Director directorB = new Director(builderB1);
        directorB.constructProduct1();
        System.out.println("建造者B创建产品1：" + builderB1.getResult());

        ConcreteBuilderB builderB2 = new ConcreteBuilderB();
        directorB = new Director(builderB2);
        directorB.constructProduct2();
        System.out.println("建造者B创建产品2：" + builderB2.getResult());

        ConcreteBuilderB builderB3 = new ConcreteBuilderB();
        directorB = new Director(builderB3);
        directorB.constructProduct3();
        System.out.println("建造者B创建产品3：" + builderB3.getResult());
    }
}
